package top.wardyan.wmes.rfid.kqa.dto;

import java.util.List;

/**
 * @author lcf
 * @CreateTime 2022/1/26 10:59
 * @Description
 */
public class Cmd28 {
    /** 模板号 **/
    private Integer templateNo;
    /** 是否清除未设置: 0 不清除 1 清除**/
    private Integer isClear;
//    /** 28号基础控制指令**/
//    private BasicCmd28 basicCmd28;
    /** 28号显示指令**/
    private List<BasicCmd28DisplayRow> displayRowList;

    public Cmd28(Integer templateNo, Integer isClear) {
        this.templateNo = templateNo;
        this.isClear = isClear;
    }

    public Cmd28(Integer templateNo, Integer isClear, List<BasicCmd28DisplayRow> displayRowList) {
        this.templateNo = templateNo;
        this.isClear = isClear;
        this.displayRowList = displayRowList;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(templateNo).append("|").append(isClear).append("|").append((displayRowList == null || displayRowList.size() <= 0) ? 0 : displayRowList.size());
        displayRowList.forEach(s -> {
            sb.append("|").append(s.toString());
        });
        return sb.toString();
    }

	public Integer getTemplateNo() {
		return templateNo;
	}

	public Cmd28 setTemplateNo(Integer templateNo) {
		this.templateNo = templateNo;
		return this;
	}

	public Integer getIsClear() {
		return isClear;
	}

	public Cmd28 setIsClear(Integer isClear) {
		this.isClear = isClear;
		return this;
	}

	public List<BasicCmd28DisplayRow> getDisplayRowList() {
		return displayRowList;
	}

	public Cmd28 setDisplayRowList(List<BasicCmd28DisplayRow> displayRowList) {
		this.displayRowList = displayRowList;
		return this;
	}
}
